import BasicLayout from "@console/layouts/BasicLayout.vue";
import { IconGrid } from "@halo-dev/components";
import { definePlugin } from "@halo-dev/console-shared";
import { markRaw } from "vue";
import ProductList from "./ProductList.vue";

export default definePlugin({
  routes: [
    {
      path: "/products",
      name: "ProductsRoot",
      component: BasicLayout,
      meta: {
        title: "产品管理",
        searchable: true,
        permissions: ["system:products:view"],
        menu: {
          name: "产品管理",
          group: "content",
          icon: markRaw(IconGrid),
          priority: 11,
          mobile: true,
        },
      },
      children: [
        {
          path: "",
          name: "Products",
          component: ProductList,
        },
      ],
    },
  ],
});